//
//  StrEnum.swift
//  ReportScan
//
//  Created by woniu on 2025/11/7.
//

//两只蜗牛的居民档案状态枚举
enum UserStatusEnum:Int{
    //正常
    case kNomarl = 0
    //迁出
    case kMoveOut = 1
    //死亡
    case kDeath = 2
    //失访
    case kLose = 4
    //其他
    case kOther = 3
    //已注销
    case kSignOut = 5
    
    ///根据枚举，获取档案状态字符串
    public func getUserStatusStr()->String{
        switch self {
        case .kNomarl:
            return "正常"
        case .kMoveOut:
            return "迁出"
        case .kDeath:
            return "死亡"
        case .kLose:
            return "失访"
        case .kOther:
            return "其他"
        case .kSignOut:
            return "注销"
        }
    }
    public static func getUserStatusStr(_ statu:Int)->String{
        if let type = UserStatusEnum(rawValue: statu){
            return type.getUserStatusStr()
        }
        return ""
    }
}

//云平台的居民档案状态
enum CloudArchivesStatusEnum:String{
    //正常
    case kNomarl = "10"
    //迁出
    case kMoveOut = "22"
    //死亡
    case kDeath = "90"
    //失访
    case kLose = "21"
    //已注销
    case kSignOut = "01"
}
